/*
 * Created by JFormDesigner on Wed Jun 26 19:05:15 CST 2024
 */

package scct.jiangjiale.ui;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 * @author 蒋家乐
 */
public class FormMain extends JFrame {
    public FormMain() {
        initComponents();
    }

    private void button2(ActionEvent e) {  //主页面第一个按钮监听
     //  System.out.println("sdscvd");
        panelUserManager panusermanager =new panelUserManager(this);
        //创建usermanage面板
        panelMain.removeAll();
        
        panelMain.add(panusermanager,BorderLayout.CENTER);
        validate();
        
        
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        // Generated using JFormDesigner Evaluation license - 蒋家乐
        menuBar1 = new JMenuBar();
        menu1 = new JMenu();
        menuItem1 = new JMenuItem();
        menuItem2 = new JMenuItem();
        menu2 = new JMenu();
        menuItem4 = new JMenuItem();
        menuItem5 = new JMenuItem();
        menuItem7 = new JMenuItem();
        menu4 = new JMenu();
        menuItem6 = new JMenuItem();
        toolBar2 = new JToolBar();
        button2 = new JButton();
        button3 = new JButton();
        button4 = new JButton();
        panelMain = new JPanel();

        //======== this ========
        setTitle("\u9910\u996e\u7ba1\u7406\u7cfb\u7edf");
        var contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());

        //======== menuBar1 ========
        {

            //======== menu1 ========
            {
                menu1.setText("\u7cfb\u7edf");

                //---- menuItem1 ----
                menuItem1.setText("\u7528\u6237\u7ba1\u7406");
                menu1.add(menuItem1);

                //---- menuItem2 ----
                menuItem2.setText("\u9000\u51fa");
                menu1.add(menuItem2);
            }
            menuBar1.add(menu1);

            //======== menu2 ========
            {
                menu2.setText("\u7ba1\u7406");

                //---- menuItem4 ----
                menuItem4.setText("\u5458\u5de5\u7ba1\u7406");
                menu2.add(menuItem4);

                //---- menuItem5 ----
                menuItem5.setText("\u83dc\u54c1\u7ba1\u7406");
                menu2.add(menuItem5);

                //---- menuItem7 ----
                menuItem7.setText("\u6750\u6599\u7ba1\u7406");
                menu2.add(menuItem7);
            }
            menuBar1.add(menu2);

            //======== menu4 ========
            {
                menu4.setText("\u5173\u4e8e");

                //---- menuItem6 ----
                menuItem6.setText("\u6211\u7684\u9879\u76ee");
                menu4.add(menuItem6);
            }
            menuBar1.add(menu4);
        }
        setJMenuBar(menuBar1);

        //======== toolBar2 ========
        {
            toolBar2.setFloatable(false);

            //---- button2 ----
            button2.setIcon(new ImageIcon(getClass().getResource("/piture/R.png")));
            button2.setToolTipText("\u7528\u6237\u7ba1\u7406");
            button2.addActionListener(e -> button2(e));
            toolBar2.add(button2);

            //---- button3 ----
            button3.setIcon(new ImageIcon(getClass().getResource("/piture/\u4efb\u52a1.png")));
            button3.setToolTipText("\u5458\u5de5\u7ba1\u7406");
            toolBar2.add(button3);

            //---- button4 ----
            button4.setIcon(new ImageIcon(getClass().getResource("/piture/\u95ee\u597d.png")));
            toolBar2.add(button4);
        }
        contentPane.add(toolBar2, BorderLayout.NORTH);

        //======== panelMain ========
        {
            panelMain.setBorder ( new javax . swing. border .CompoundBorder ( new javax . swing. border .TitledBorder ( new javax . swing. border .EmptyBorder
            ( 0, 0 ,0 , 0) ,  "JF\u006frm\u0044es\u0069gn\u0065r \u0045va\u006cua\u0074io\u006e" , javax. swing .border . TitledBorder. CENTER ,javax . swing. border
            .TitledBorder . BOTTOM, new java. awt .Font ( "D\u0069al\u006fg", java .awt . Font. BOLD ,12 ) ,java . awt
            . Color .red ) ,panelMain. getBorder () ) ); panelMain. addPropertyChangeListener( new java. beans .PropertyChangeListener ( ){ @Override public void
            propertyChange (java . beans. PropertyChangeEvent e) { if( "\u0062or\u0064er" .equals ( e. getPropertyName () ) )throw new RuntimeException( )
            ;} } );
            panelMain.setLayout(new BorderLayout());
        }
        contentPane.add(panelMain, BorderLayout.CENTER);
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    // Generated using JFormDesigner Evaluation license - 蒋家乐
    private JMenuBar menuBar1;
    private JMenu menu1;
    private JMenuItem menuItem1;
    private JMenuItem menuItem2;
    private JMenu menu2;
    private JMenuItem menuItem4;
    private JMenuItem menuItem5;
    private JMenuItem menuItem7;
    private JMenu menu4;
    private JMenuItem menuItem6;
    private JToolBar toolBar2;
    private JButton button2;
    private JButton button3;
    private JButton button4;
    private JPanel panelMain;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
